package com.ego.coupon.config;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * @program: ego
 * @description: 消息队列配置类
 * @author: KamTang
 * @create: 2022-12-20 09:44
 **/
@Configuration
public class RabbitMqConfig {

    /**
     * 使用JSON序列化机制，进行消息转化
     */
    @Bean
    public MessageConverter messageConverter() {
        return new Jackson2JsonMessageConverter();
    }
}
